<script setup lang="ts">
import {type Ref, ref} from "vue";

const emit = defineEmits<{
  add: [step: number],
}>();
const step: Ref<number> = ref(1)


function add() {
  console.log(step.value)
  emit('add', step.value);
}

</script>

<template>
  <div class="rounded-3 border p-3">
    <input type="text" v-model="step">
    <button @click="add">点击</button>
  </div>
</template>

<style scoped>

</style>